Remove all the newlines occurrences, not just the first one.
Fixes: 52ae75d4b ("LookingGlass - JavaScript prompt and interactive Clutter controller")
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/4084>
(cherry picked from commit
8ebf6ba2ca6000b99d6049ebbe2726c92af0e4e9)
let text = o.get_text();
// Ensure we don't get newlines in the command; the history file is
// newline-separated.
- text = text.replace('\n', ' ');
+ text = text.replaceAll('\n', ' ');
this._evaluate(text).catch(logError);
return true;
});